﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mail;
using System.Web.UI;
using System.Web.UI.WebControls;
using WdpaLoginServiceRef;

public partial class PasswordReminder : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void btnSendPassword_Click(object sender, EventArgs e)
    {
        WdpaLoginService WdpaLoginService1 = new WdpaLoginService();

        bool PwdReminded = WdpaLoginService1.PasswordReminder(tbEmail.Text);

        if (PwdReminded)
        {

            divRecoverPassword.Visible = false;
            divPasswordSent.Visible = true;

        }
        else
        {
            divRecoverPassword.Visible = true;
            divPasswordSent.Visible = false;
            LError.Text = "This email address has not been Registered with the WDPA";
        }
    }

}
